#include "dataobject.h"

DataObject::DataObject(QObject *parent) : QObject(parent) {
}

DataObject::DataObject(const QString &name, const QString &color, const QString &number, QObject *parent)
: QObject(parent), m_name(name), m_color(color), m_number(number) {
}

QString DataObject::name() const {
    return m_name;
}

void DataObject::setName(const QString &name) {
    if (name != m_name)
        m_name = name;
    emit nameChanged();
}

QString DataObject::color() const {
    return m_color;
}

void DataObject::setColor(const QString &color) {
    if (color != m_color)
        m_color = color;
    emit colorChanged();
}

QString DataObject::number() const {
    return m_number;
}

void DataObject::setNumber(const QString &number) {
    if (number != m_number)
        m_number = number;
    emit numberChanged();
}

QString DataObject::name2() const {
    return m_name2;
}

void DataObject::setName2(QString name2) {
    if (m_name2 == name2)
        return;

    m_name2 = name2;
    emit name2Changed(m_name2);
}
